<script type="text/javascript">
        var date = new Date();
        $('#msgBox input#set_date').datepicker({dateFormat: 'yy-mm-dd',
                minDate: new Date(date.getFullYear(),
                date.getMonth(), date.getDate())});
        var bCopy = $('#bCopy');
        bCopy.button({ label: "Копировать"});
        bCopy.click(function(){
                if($('#set_date').val() == '') return 0;
                $.post('{base_url}control/copy',
                        {date: $('#set_date').val(), id: "{ID}"},
                        function(data){
                                if(data.res==="error") {
                                        $('#msgBox').text(data.message);
                                        $('#msgBox').dialog({autoOpen: true, height: 'auto', title: 'Ошибка!'});
                                }
                                else
                                {
                                        //$('#men').tabs('select', 2);
					$('#myWeb').html('<div id="my_planned"></div>');
					$('div#calendar div.menu.mselected').removeClass( "mselected" );
					$('div#calendar div.menu#menu_planned').addClass("mselected");
					my_upd('planned', '');
                                        $('#msgBox').dialog('close');
                                }
                        }, 'json');
        });
</script>
Выберите дату и нажмине кнопку "Копировать".<br /><br />
<input readonly size=10 type="text" id="set_date" />
<button id="bCopy"></button>
